Conversation
There was a problem hiding this comment.
Pull request overview
This pull request implements chunk-based JSON parsing for incoming JSON-RPC requests to improve performance and handle large payloads that arrive in multiple network packets. Instead of reading all data at once with ReadToEndAsync, the code now processes data incrementally using ReadAsync in a loop, maintaining parser state between chunks.
Changes:
- Replaced
ReadToEndAsyncwith chunkedReadAsyncloop for incremental JSON parsing - Introduced
JsonReaderStateto preserve parser state across chunk boundaries - Refactored
ProcessAsyncmethod to handle partial JSON documents and resume parsing when more data arrives
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Nethermind/Nethermind.JsonRpc/JsonRpcProcessor.cs | Implements chunk-based JSON parsing with state management, replaces synchronous full-read pattern with asynchronous incremental processing |
| src/Nethermind/Nethermind.JsonRpc.Test/JsonRpcProcessorTests.cs | Adds test for processing multiple large requests arriving in chunks to verify the new parsing behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
benaadams
left a comment
There was a problem hiding this comment.
I didnt know STJ supported this; I love it :)
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
src/Nethermind/Nethermind.JsonRpc/JsonRpcProcessor.cs:134
- This early exit check does not prevent the subsequent code from executing. When ProcessExit.IsCancellationRequested is true, the method yields an error response but continues to execute the rest of the method. This should either return after yielding or be wrapped in an else clause to prevent the reader from being processed unnecessarily.
public async IAsyncEnumerable<JsonRpcResult> ProcessAsync(PipeReader reader, JsonRpcContext context)
{
if (ProcessExit.IsCancellationRequested)
{
JsonRpcErrorResponse response = _jsonRpcService.GetErrorResponse(ErrorCodes.ResourceUnavailable, "Shutting down");
yield return JsonRpcResult.Single(RecordResponse(response, new RpcReport("Shutdown", 0, false)));
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
src/Nethermind/Nethermind.Core/Extensions/ReadOnlySequenceExtensions.cs:45
- There’s an extra closing brace here, which will break compilation (method/class braces become unbalanced). Remove the stray
}so the method and class close correctly.
// The entire sequence was trimmed chars
return sequence.Slice(sequence.End);
}
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/Nethermind/Nethermind.JsonRpc.Test/JsonRpcProcessorTests.cs
Outdated
Show resolved
Hide resolved
|
@LukaszRozmej I've opened a new pull request, #10356, to work on those changes. Once the pull request is ready, I'll request review from you. |
…ests (#10356) * Initial plan * Change test endpoint from Http to Ws for multiple requests test Co-authored-by: LukaszRozmej <12445221+LukaszRozmej@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: LukaszRozmej <12445221+LukaszRozmej@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/Nethermind/Nethermind.JsonRpc.Test/JsonRpcProcessorTests.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/Nethermind/Nethermind.JsonRpc.Test/JsonRpcProcessorTests.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| private ArrayPoolList<JsonRpcRequest> DeserializeArray(JsonElement element) => | ||
| new(element.GetArrayLength(), element.EnumerateArray().Select(DeserializeObject)); | ||
|
|
||
| private static readonly JsonReaderOptions _jsonReaderOptions = new() { AllowMultipleValues = true }; |
There was a problem hiding this comment.
Allowing multiple top-level JSON values in the reader (AllowMultipleValues=true) combined with the HTTP pipeline only consuming the first JsonRpcResult (Startup.cs breaks after the first response) means trailing non-whitespace bytes (or even a second JSON document) can be silently ignored for HTTP requests. If HTTP is intended to accept exactly one JSON-RPC request (object or batch array), consider making this behavior endpoint-specific: for Http contexts, validate that the remaining bytes after the first parsed value are only whitespace once the body is complete, and return a single ParseError/InvalidRequest instead of yielding a successful response for the first value.
| private static readonly JsonReaderOptions _jsonReaderOptions = new() { AllowMultipleValues = true }; | |
| private static readonly JsonReaderOptions _jsonReaderOptions = new() { AllowMultipleValues = false }; |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
* feat(abi): add support for fixed-size array element types (#10025)
* XDC Reward handler (#9881)
* calculator
* state reader
* masternode voting contract
* fix
* abi json
* working load test
* test
* test
* test getCandidates
* cleanup
* format
* remove var
* format
* review comments
* implement calculate rewards base flow and get signing txs
* implement rewards per signer and distribution calculations
* implement getCadidateOwner
* refactors and add comments to the code
* add block signer contract address to the configuration spec
* implement reward module tests
* implement hook for reward calculation in hotstuff pipeline
* refactor and format
* format
* fix xdc test
* wire IRewardClaculator in ConfigureContainer in XdcTestBlockchain
* address review comments and add unit test with precalculated xdc reward values
* add missing dependencies in Xdc module
* fix resolving contract addresses from spec
* fix error with WorldState after merge
* add comments for reward tests with link to original source
---------
Co-authored-by: ak88 <anders.holmbjerg@hotmail.com>
Co-authored-by: ak88 <anders@nethermind.io>
* Use baseblock for tree visitor (#10066)
* Surge: Fix Profitabilty Check Bypass (#10020)
* add potential fix
* nit: improve config description
* Skip SST file size checks when MaxOpenFiles is specified (#10002)
* Skip SST file size checks when MaxOpenFiles is specified
* Add config option, skip SST checks on MacOS if not configured otherwise
* Remove obvious comment
* Fix: Correct memory access validation in TrySaveByte for MSTORE8 operation (#9970)
* Update EvmPooledMemory.cs
* Update src/Nethermind/Nethermind.Evm/EvmPooledMemory.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Nethermind/Nethermind.Evm/EvmPooledMemory.cs
* Update src/Nethermind/Nethermind.Evm/EvmPooledMemory.cs
---------
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update file header templates (#10077)
* Should update child if parent has empty keccak as well (#10073)
* Should update child if parent has empty keccak as well
* Combine conditions
* Improve FastHash quality (#10082)
* Improve hash quality
* formatting
* Update src/Nethermind/Nethermind.Core/Extensions/SpanExtensions.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* refactor: replace HexConvert.ToUInt256 with UInt256.Parse (#10085)
Keep HexConvert.ToUInt64 as it handles both base 10 and 16 automatically.
* fix: ensure eth_getBlockByNumber enforces canonical block retrieval (#10024)
* fix: ensure eth_getBlockByNumber enforces canonical block retrieval
* fix tests
* address comment
* apply suggestion
* Auto-update fast sync settings (#10089)
Co-authored-by: rubo <rubo@users.noreply.github.com>
* fix: correct assertion variables in Cleans_invalid_blocks_before_starting test (#10086)
Update BlockTreeTests.cs
* Drop eth66 and eth67 support, add eth69 as a default (#9938)
* Drop eth66 and eth67 support
* Fix tests
* test
* bump versions
* Fix E2ESyncTests failures when isPostMerge=false - remove eth/69 from default capabilities (#10103)
* Initial plan
* Remove eth/69 from default capabilities - added dynamically by MergePlugin
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>
* Fix test expecting eth/69 as highest default protocol version
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>
* fix
---------
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>
* fix(network): shutdown rlpx executor group (#10087)
* feat (gas policy): add `ConsumeCodeCopyGas` method (#10068)
* Add Address recovery from PublicKey to KeccakCache (#10003)
* Add Address recovery from PublicKey to KeccakCache
* Improve comments
* Feedback
* refactor: remove unused Destroy change type from storage provider (#10106)
* Update to UInt256 version 1.4.0 (#10107)
* Update to UInt256 version 1.4.0
* Fix some div zero
* chore: remove debug-only keccak keys from proof call storage test (#10104)
* fix: use parameter name in BloomStorage null check (#10096)
* fix: correct ExampleResponse for admin_importHistory method (#10097)
Update IEraAdminRpcModule.cs
* fix: remove redundant blockInfosDb assertions (#10099)
Update BlockTreeTests.cs
* perf: reuse SimpleConsoleLogger instance in SimpleConsoleLogManager (#10070)
Update SimpleConsoleLogManager.cs
* optimize eth_gasPrice using kth algorithm (#10100)
* optimize eth_gasPrice using kth algorithm
* fix: review nethermind
---------
Co-authored-by: weixie.cui <weixie.cui@okg.com>
* Don't queue prunes (#10112)
* Don't queue prunes
* Add delay
* Add Delay reasoning comment
* refactor: simplify Avx2 branches for UInt256 shuffles (#10111)
* refactor: simplify Avx2 branches for UInt256 shuffles
* Update EvmStack.cs
* fix(kute): prevent null label crash in Prometheus metrics reporter (#10109)
* Fix #10068 regression (#10116)
* Git/ignore claude config (#10118)
* Ignore claude config in git
* Ignore claude config in git
* perf: use cached BlockInfo variable instead of redundant array access in BlockTree (#10125)
Update BlockTree.cs
* Save space locally on builds (#10113)
* Add Directory.Build.targets with:
- Skip copying dependencies and native runtimes for library projects
- Filter native runtimes to current OS only during local builds
- Share native runtimes across projects during local builds with a shared location and junctions/symlinks
* NethermindCopyAllRuntimes -> CI
* Remove filtering native lib by os
* Move Directory.Build.targets to src/Nethermind
* Make mechanism opt-in with SlimBuild parameter
Add Directory.Build.targets to Solution Items
* SlimBuild can have any value to be enabled
* Refactor Directory.Build.targets (#10122)
---------
Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>
* Align Nethermind with the latest taiko-geth changes (#10127)
* Surge TDX Attestation (#9954)
* initial changes for taiko tdx
* fixes and refactoring
* optimize attestation
* simplify attestation, return block header and add tests
* add two variants for attestation, remove quotes & instance id, add tests
* remove docs
* minor fix
* modify header attestation to return both hash and header rlp
* refactor
* fix tests and address comments
* nit: fix whitespace
* undo tdx module change
* modify signature to use blockhash+stateroot
* fix new header serialization
* address comments
---------
Co-authored-by: smartprogrammer93 <smartprogrammer@windowslive.com>
* Remove redundant `File.Delete` after `File.Move` (#10128)
* refactor: simplify conditional returns in FeeTooLowFilter (#10129)
* refactor: remove unused finalization manager field in Optimism plugin (#10130)
* Optimize discv5 (#10081)
* Update schema
* Fix schema
* No need in type cast
* Use improved discv5; refactor
* Update PierTwo.Lantern.Discv5.WireProtocol
* Less errors
* Pooled
* refactor: remove unused `_pushEnabled` from MonitoringService (#10135)
refactor: remove unused _pushEnabled from MonitoringService
* Add some guards to RetryCache (#10134)
* Add some guards to RetryCache
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
---------
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
Co-authored-by: Marcos Antonio Maceo <35319980+stdevMac@users.noreply.github.com>
* XDC save snapshot on gap block (#9774)
* start
* state reader
* state reader
* masternode voting contract
* fix
* blocktree saves snapshot on gap
* abi json
* working load test
* test
* test
* test getCandidates
* cleanup
* format
* update masternodes
* hooked up with deposit contract
* remove var
* format
* review comments
* format
* test rewrite
* test fix
* format
* test save snapshot on head block
* merge fix
* cleanup
* merge fix
* merge fix
* merge fix
* remove using
* remove class
* fix MasternodeVotingContract IOC
* perf: Remove redundant allocations in NettyDiscoveryHandlerTests (#10155)
Update NettyDiscoveryHandlerTests.cs
* fix: correct header range logging in PoW forward sync (#10140)
Update PowForwardHeaderProvider.cs
* fix: avoid GetReceiptData when hash lookup unsupported (#10023)
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* fix: correct slice index in Address.TryParseVariableLength (#9902)
* fix: correct slice index in Address.TryParseVariableLength
* test
* update test
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Update src/Nethermind/Nethermind.Core.Test/AddressTests.cs
---------
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* perf(facade): optimize SimulateDictionaryHeaderStore.Get for cache hits (#9903)
* fix: add informative message to block processing timeout exception (#9912)
Update HiveRunner.cs
* fix: Remove invalid eth_getTransactionByHash call (#9784)
* Fix typos 2 (#10162)
* Few typos fixed
* Check in the pipeline
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Remove
* Some fixes
* Test
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: remove duplicate transaction processor adapter registration (#10170)
* perf: avoid extra init code allocations in CREATE/EOFCREATE (#10019)
* perf: avoid extra init code allocations in CREATE/EOFCREATE
* perf: avoid extra init code allocations in CREATE/EOFCREATE
* Replace empty array initializations with Array.Empty<T>() (#10172)
* Initial plan
* Replace empty array initializations with Array.Empty<T>()
Co-authored-by: MarekM25 <9356351+MarekM25@users.noreply.github.com>
* Replace new Address[0] with Array.Empty<Address>() in Xdc production code
Co-authored-by: MarekM25 <9356351+MarekM25@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: MarekM25 <9356351+MarekM25@users.noreply.github.com>
* Fix disposing of a pooled array (#10168)
* fix(SendBlobs): add missing receiverOption to reclaim command (#10136)
* Auto-update fast sync settings (#10179)
Co-authored-by: rubo <rubo@users.noreply.github.com>
* fix(sync): use INetworkConfig constructor for SyncPeerPool DI registration (#10158)
* fix(sync): use INetworkConfig constructor for SyncPeerPool DI registration
SyncPeerPool was ignoring the configured MaxActivePeers value and always
using a hardcoded default of 100 peers.
Root cause: SyncPeerPool has two constructors:
1. One taking INetworkConfig that reads ActivePeersMaxCount from config
2. One with default parameters (peersMaxCount = 100)
The DI registration `.AddSingleton<SyncPeerPool>()` allowed Autofac to
pick a constructor automatically. Autofac selected the constructor with
default parameters, completely bypassing INetworkConfig. This caused
SyncPeerPool.PeerMaxCount to always be 100 regardless of the configured
Network.MaxActivePeers value.
Fix: Use explicit factory registration that specifies INetworkConfig as
a dependency, ensuring the correct constructor is called with config values.
* refactor: use UseConstructorForDependencyInjection attribute and add test
* refactor(tools): eliminate redundant First() calls in HiveConsensusWorkflowGenerator (#10182)
Update Program.cs
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* docs: fix dead link (#10181)
Update ForkchoiceUpdatedV1Result.cs
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Remove redundant ToArray calls in eth_accounts (#10185)
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Override default CLI option alias (#10148)
Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>
* Add AGENTS.md (#10177)
* Fix cannot prune storage root (#10203)
* Fix cannot prune storage root
* Fix whitespace formatting in TreeStoreTests.cs (#10204)
* Initial plan
* Fix whitespace formatting in TreeStoreTests.cs
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
---------
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
* Support CLI alias overrides in docs (#10197)
* Fast-path ConcurrentDict AddOrUpdate (#10220)
* Fast-path ConcurrentDict AddOrUpdate
* Also debug
* Reuse same nibble keys for short paths (#10214)
* Reuse same nibble keys for short paths
* Address review comments: remove unused parameter, add XML docs, add unit tests for GetPathArray (#10215)
* Initial plan
* Address review comments: remove unused parameter, add XML docs, add unit tests
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>
* formatting
* Other places
* formatting
* More optimal
* Add tests for PrependNibble and ConcatNibbles methods (#10216)
* Initial plan
* Add comprehensive tests for PrependNibble and ConcatNibbles methods
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>
* Fix misleading comments in ConcatNibbles tests
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>
* Add validation checks to ConcatNibbles for invalid nibble values (#10217)
* Initial plan
* Add validation checks to ConcatNibbles for robustness
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>
* Update src/Nethermind/Nethermind.Trie/HexPrefix.cs
Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>
---------
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>
Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>
* Update Dockerfiles (#10222)
Co-authored-by: rubo <rubo@users.noreply.github.com>
* Change async capturing closures to regular async methods (#10221)
* Change async capturing closures to regular async methods
* Formatting
* Spelling
* Reduce closure allocations in RetryCache (#10223)
* Reduce closure allocations in RetryCache
* Feedback
* perf: Avoid unnecessary base fee calculations (#10213)
* Update OP Superchain chains (#10178)
Co-authored-by: emlautarom1 <emlautarom1@users.noreply.github.com>
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Remove redundant static metadata from `CachedPrecompile` wrapper (#10225)
Update CachedCodeInfoRepository.cs
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* refactor: extract duplicate chain ID retrieval logic in SendBlobs CLI (#10150)
Update SetupCli.cs
* perf: avoid eager client id formatting in ZeroNettyP2PHandler (#10189)
* perf: avoid eager client id formatting in ZeroNettyP2PHandler
* Update src/Nethermind/Nethermind.Network/P2P/ProtocolHandlers/ZeroNettyP2PHandler.cs
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* add GetClientId and remove duplication
* Apply suggestions from code review
* Apply suggestion from @LukaszRozmej
---------
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* fix: align storage tracing flag for ReportStorageChange (#10201)
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* fix(test-runner): Use maxPriorityFeePerGas for EIP-1559 state test parsing (#10205)
For EIP-1559+ transactions, GasPrice is aliased to MaxPriorityFeePerGas
in go-ethereum. When parsing state tests, use maxPriorityFeePerGas from
JSON when available, falling back to maxFeePerGas if not specified.
This aligns Nethermind's state test parsing behavior with go-ethereum.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Alexey Osipov <me@flcl.me>
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* fix: gRPC client reconnect to shutdown previous channel (#10156)
* fix: gRPC client reconnect to shutdown previous channel
* Update src/Nethermind/Nethermind.Grpc/Clients/GrpcClient.cs
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Update src/Nethermind/Nethermind.Grpc/Clients/GrpcClient.cs
---------
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* perf: eliminate redundant allocations in SendData byte normalization (#10154)
Update BlobSender.cs
* refactor: split ClHealthTrackerTests into separate test methods (#10171)
* Update ClHealthTrackerTests.cs
* Update ClHealthTrackerTests.cs
---------
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Optimize `PathUtils` (#10219)
* Use `ConcurrentDictionary.GetOrAdd` in `Session` to avoid manual get-or-add logic (#10229)
Update Session.cs
* Allow some delays to be configurable (#10227)
* Allow some delays to be configurable
* Always async
* Formatting
* Update src/Nethermind/Nethermind.Merge.Plugin/IMergeConfig.cs
Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>
* Update src/Nethermind/Nethermind.Db/IPruningConfig.cs
Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>
---------
Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>
* Schedule largest storage changes first (#10236)
* Schedule largest storage changes first
* Feedback
* fix: SyncDispatcher leak by disposing CountdownEvent (#10240)
* Move default implementations out of IReleaseSpec (#10237)
* Move default implementations out of IReleaseSpec
* fix some test
* Update src/Nethermind/Nethermind.Core/Specs/IReleaseSpecExtensions.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix more tests
* Cleanup ISpecProvider.GetSpec
* fix test
* less whitespace
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix `PathUtils` for JetBrains Rider (#10238)
* Apply a workaround for JetBrains Rider
* Don't use `System.Diagnostics`
* Fix formatting
* Optimize storage key handling (#10241)
* Optimize storage key handling
Replaces byte[] with ValueHash256 for storage key lookup and computation in StorageTree for improved type safety and performance. Updates related method signatures and usages to use ValueHash256. Adds [SkipLocalsInit] attribute to several performance-critical methods in trie and pruning code.
* Feedback
* fix: avoid mutating levels in header/body existence checks (#10157)
* fix: Add missing fields to Transaction.CopyTo and PoolPolicy.Return (#9890)
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Consider genesis in processing and finalization (#10235)
* Refactor/Allow metrics before block processing (#10076)
* Invert metric dependencies
* Use timer loop
* Rename metrics updater
* Comment
* Reduce change
* Reduce change
* Unit tests
* Some cleanup
* Fix dependencies
* Add missing file header
* Update src/Nethermind/Nethermind.Init/Modules/MonitoringModule.cs
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Update src/Nethermind/Nethermind.Init/Steps/EthereumStepsManager.cs
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Split the monitoring module out
* Use BlockEventArgs
* Whitespace
* Address PR review comments: fix comment and remove unused method (#10084)
* Initial plan
* Address PR review comments: update comment and remove StopAsync
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
* Move db monitoring outside
* Fix build
* [WIP] Refactor to allow metrics before block processing (#10186)
* Initial plan
* Fix filename format issue: remove trailing space from IMonitoringService.cs
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
* Does this fix format?
---------
Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
* Fix maybe combine logic fetch child with wrong path. (#10145)
* Fix maybe combine logicc missed a fetch node
* Fix typo in test class name: StrictRawScopedTrieStoce → StrictRawScopedTrieStore (#10146)
* Initial plan
* Fix typo in class name: StrictRawScopedTrieStoce -> StrictRawScopedTrieStore
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
---------
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
* Feature/RocksDb Snapshot (#10080)
* Snapshot support
* Move logic to db reader
* Ensure get is used
* Add comment on verify checksum
* Format
* Address PR #10080 review comments: fix memory leaks, improve documentation, add safety checks (#10083)
* Initial plan
* Address review comments: fix docs, memory leaks, and add safety checks
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
* Remove unused _readOptions field from RocksdbSortedView
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
* Use discard pattern for unused readOptions parameter
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
* Remove unnecessary readOptions parameter from RocksdbSortedView
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
* Make nullable
---------
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
* Bump default pruning cache by 512MB for larger mainnet blocks (#10247)
Bump default pruning cache by 512MB
* Fix: Change Taiko RPC Response to PascalCase (#10244)
change case
* perf(clique): eliminate redundant cache lookup in GetBlockSealer (#10252)
Update SnapshotManager.cs
* Skip GC when pruning (#10230)
* Skip GC when pruning
* fix
* feedback
* Auto-update fast sync settings (#10260)
Co-authored-by: rubo <rubo@users.noreply.github.com>
* Update OP Superchain chains (#10261)
Co-authored-by: emlautarom1 <emlautarom1@users.noreply.github.com>
* Fix/shared blockcache not used (#10263)
* Cleaner optimize for hits
* Columns db snapshot
* Fix block cache
* Fix test
* Fix test
* Fix build
* Spell fix
* Refactor HyperClockCacheWrapper to use SafeHandle pattern (#10265)
* Initial plan
* Refactor HyperClockCacheWrapper to use SafeHandle pattern
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
---------
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
* ColumnsDb snapshot (#10262)
* ColumnsDb snapshot
* Apply PR feedback: use NotSupportedException and simplify lambda syntax (#10264)
* Initial plan
* Apply PR feedback: use NotSupportedException and simplify lambda syntax
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
---------
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
* Refactor ReleaseSpec (#10251)
* Add taiko debug RPC for integration test support (#10211)
* Add taikoAuth_waitForTxPoolSync method
* Revert unnecessary changes
* Update src/Nethermind/Nethermind.TxPool/ITxPool.cs
* Update src/Nethermind/Nethermind.TxPool/TxPool.cs
* Update src/Nethermind/Nethermind.TxPool/HashCache.cs
* Resolve comments
* Simplify, remove needless logic, and rename
* Resolve comments
---------
Co-authored-by: Ahmad Bitar <33181301+smartprogrammer93@users.noreply.github.com>
* feat(tracing): enable external tracer registration and VM inheritance (#10228)
* Re-enable prewarmer tx adapter for state pre-warming (#10266)
Enable prewarmer tx adapter for state pre-warming
* Validate state test tx as part of a block (#10224)
* Add basic block validation to state tests
* Some cleanup
* Fix review
* Add ProgressLogger to trie verification and full pruning operations (#10273)
* docs: add implementation plan for ProgressLogger trie visitor integration
Addresses #8504 - More use of ProgressLogger
Detailed step-by-step plan with:
- VisitorProgressTracker class implementation
- Unit tests for thread-safety and accuracy
- Integration into CopyTreeVisitor and TrieStatsCollector
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat(trie): add VisitorProgressTracker for path-based progress estimation
Addresses #8504 - More use of ProgressLogger
- Tracks visited path prefixes at 4 levels (16 to 65536 granularity)
- Thread-safe for concurrent traversal
- Estimates progress from keyspace position, not node count
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* test(trie): add unit tests for VisitorProgressTracker
Tests cover:
- Progress tracking at different levels
- Thread-safety with concurrent calls
- Monotonically increasing progress
- Edge cases (short paths, empty path)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat(pruning): integrate VisitorProgressTracker into CopyTreeVisitor
Replaces manual every-1M-nodes logging with path-based progress estimation.
Progress now shows actual percentage through the keyspace.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Improve TrieStatsCollector progress display
- Always enable progress tracking in TrieStatsCollector
- Add custom formatter to show node count instead of block speed
- Track max reported progress to prevent backwards jumps
- Display format: "Trie Verification 12.34% [...] nodes: 1.2M"
Fixes progress display issues where:
- Progress would jump backwards (12% → 5%) due to granularity switching
- Showed confusing "Blk/s" units for trie operations
- Displayed "11 / 100 (11.00%)" format that looked odd
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* docs: remove implementation plan documents
Implementation is complete, no need for plan docs in the codebase.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Track both state and storage nodes in progress display
The node count now includes both state and storage nodes, providing
a more accurate representation of total work done. Progress estimation
still uses state trie paths only.
Changes:
- Add _totalWorkDone counter for display (state + storage nodes)
- Add isStorage parameter to OnNodeVisited()
- Always increment total work, only track state nodes for progress
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Optimize progress tracking with active level and startup delay
Improvements:
- Add 1 second startup delay before logging to prevent early high
values from getting stuck in _maxReportedProgress
- Only track the deepest level with >5% coverage (active level)
- Stop incrementing counts for shallower levels once deeper level
has significant coverage
- This ensures progress never shows less than 5% and provides
more accurate granularity
Technical changes:
- Add _activeLevel field to track current deepest significant level
- Add _startTime field and skip logging for first second
- Only increment seen counts at active level or deeper
- Automatically promote to deeper level when >5% coverage reached
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Simplify progress tracking to only use level 3 with leaf estimation
Changed to a much simpler approach as requested:
- Only track progress at level 3 (4 nibbles = 65536 possible nodes)
- For nodes at depth 4: increment count by 1
- For LEAF nodes at shallower depths: estimate coverage
- Depth 1: covers 16^3 = 4096 level-3 nodes
- Depth 2: covers 16^2 = 256 level-3 nodes
- Depth 3: covers 16^1 = 16 level-3 nodes
- Non-leaf nodes at shallow depths: don't count (will be covered by deeper nodes)
- Keep 1 second startup delay to prevent early high percentages
This assumes the top of the tree is dense and provides accurate
progress estimation based on actual trie structure.
Updated tests to mark nodes as leaves where appropriate.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix full pruning progress tracking
- Pass isStorage and isLeaf parameters in CopyTreeVisitor
- Storage nodes no longer contribute to state trie progress estimation
- Leaf nodes at shallow depths now correctly estimate coverage
- Increase startup delay to 5 seconds AND require at least 1% progress
- Prevents early high estimates from getting stuck in _maxReportedProgress
This fixes the issue where full pruning progress would immediately jump
to 100% and not show meaningful progress during the copy operation.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Simplify VisitorProgressTracker to single-level tracking
Since we only track level 3 (4 nibbles), remove unnecessary array
structure:
- Replace int[][] _seen with int[] _seen (65536 entries)
- Replace int[] _seenCounts with int _seenCount
- Replace int[] MaxAtLevel with const int MaxNodes
- Rename MaxLevel to Level3Depth for clarity
This reduces memory allocation from 70,304 ints (16+256+4096+65536)
to just 65,536 ints, and makes the code clearer.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Remove unnecessary _seen array from VisitorProgressTracker
Since OnNodeVisited is only called once per path, we don't need to
track which prefixes we've seen. Just increment _seenCount directly.
This eliminates the 65536-int array, reducing memory from 262KB to
just a few counters.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Remove _maxReportedProgress and allow progress to reverse
- Remove _maxReportedProgress field and backwards-prevention logic
- Report actual progress value even if it goes backwards
- Fix path.Length check: only count nodes at exactly Level3Depth
- Ignore nodes at depth > Level3Depth for progress calculation
- Simplify comment about startup delay
Progress should reflect reality, not be artificially constrained.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix lint
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* feat: enable taiko client CI integration tests (#10043)
* feat: enable taiko client ci integration tests
* fix: gh action structure to run l2_nmc locally
* feat: add path for ci-taiko file
* Update GitHub Actions checkout reference surge-taiko-mono
* fix: remove unused IStateReader from SnapServer (#10282)
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* StateProvider: remove redundant state-root update flag assignment in balance updates (#10268)
Update StateProvider.cs
* refactor: eliminate delegate allocations in DbOnTheRocks iterator methods (#10209)
Update DbOnTheRocks.cs
* Warmup threads should not update tx.SpentGas (#10267)
Warmup threads do not update tx.SpentGas
* Remove mark persisted recursively (#10283)
* Remove mark persisted
* Whitespace
* Test project tests to be split in chunks and run in parallel (#10243)
* Test in chunks
* Test
* Sequential
* Test
* Simplify
* Update OP Superchain chains (#10315)
Co-authored-by: emlautarom1 <emlautarom1@users.noreply.github.com>
* Auto-update fast sync settings (#10314)
Co-authored-by: rubo <rubo@users.noreply.github.com>
* fix(chainspec): add Prague support to spaceneth dev chain (#10316)
* fix(chainspec): add maxCodeSize to spaceneth for EIP-3860
* fix(chainspec): add explicit chainID to spaceneth
* fix(chainspec): add Prague system contracts to spaceneth genesis
* Warn when dirty prune cache is too low (#10143)
* Initial plan
* Add warning when dirty prune cache is too low
When the dirty prune cache is too low, pruning cannot effectively reduce
the node cache, causing it to keep re-pruning with little progress.
This change adds a warning when the pruning cache size after pruning
is more than 80% of its size before pruning, suggesting to increase
the pruning cache limit.
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
* Extract magic number to named constant
Extract the 0.8 threshold to PruningEfficiencyWarningThreshold constant
for better code readability and maintainability.
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
* Mention --Pruning.DirtyCacheMb argument in warning message
Updated the warning message to include the specific command-line
argument (--Pruning.DirtyCacheMb) that users can use to increase
the pruning cache limit.
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
* Include recommended cache size in warning message
Added calculation and display of recommended dirty cache size
(current size + 30%) in the warning message to provide users
with a concrete value to set.
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
* Update warning threshold to 0.9 and use lowercase argument format
Changed PruningEfficiencyWarningThreshold from 0.8 to 0.9 (now warns
when retention ratio > 90% instead of > 80%). Updated argument format
in warning message from --Pruning.DirtyCacheMb to --pruning-dirtycachemb.
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
* Optimize warning check and add guard for sparse networks
- Move _logger.IsWarn check to outer if statement to skip calculations
when logging is disabled
- Add minimum threshold (256MB) to prevent false positives on sparse
networks with many empty blocks
- Addresses code review feedback from @LukaszRozmej
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
* Update src/Nethermind/Nethermind.Trie/Pruning/TrieStore.cs
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Remove 256MB threshold and add cspell ignore for CLI args
- Removed 256MB minimum threshold as function is only called when
memory exceeds pruning threshold (per @asdacap feedback)
- Added cspell ignore rule for command-line arguments pattern
(--something-something) to fix cspell warnings
- Addresses feedback from @LukaszRozmej, @asdacap, and @flcl42
Co-authored-by: flcl42 <630501+flcl42@users.noreply.github.com>
* Simplify cspell regex to match exactly two-word CLI flags
Changed pattern from /--[a-z]+(-[a-z]+)*/gi to /--[a-z]+-[a-z]+/gi
since all CLI flags are always exactly two words (e.g., --pruning-dirtycachemb).
Addresses feedback from @flcl42.
Co-authored-by: flcl42 <630501+flcl42@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asdacap <1841324+asdacap@users.noreply.github.com>
Co-authored-by: Amirul Ashraf <asdacap@gmail.com>
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
Co-authored-by: flcl42 <630501+flcl42@users.noreply.github.com>
* refactor: remove redundant null checks in SnapProviderHelper.AddAccountRange (#10298)
Update SnapProviderHelper.cs
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* fix(txpool): remove redundant hasBeenRemoved check in RemoveTransaction (#10319)
* fix(sync,trie): Handle timeout exceptions and empty trie sealing in PoW sync (#10307)
* fix(sync): Handle OperationCanceledException as timeout in PowForwardHeaderProvider
## Problem
PoW chain sync (ETC, etc.) stops completely after a single header request
timeout when running in DEBUG mode. The sync stalls with "SyncDispatcher
has finished work" even though blocks remain to sync.
## Root Cause
Commit cc56a0333f ("Reduce exceptions in ZeroProtocolHandlerBase") changed
timeout handling from throwing TimeoutException to calling TrySetCanceled():
```csharp
// Before: throw new TimeoutException(...);
// After: request.CompletionSource.TrySetCanceled(cancellationToken);
```
This was a performance optimization to reduce exception overhead, but it
changed the contract: callers expecting TimeoutException now receive
OperationCanceledException (via TaskCanceledException).
PowForwardHeaderProvider only caught TimeoutException:
```csharp
catch (TimeoutException)
{
syncPeerPool.ReportWeakPeer(bestPeer, AllocationContexts.ForwardHeader);
return null;
}
```
The uncaught OperationCanceledException propagates to BlockDownloader which,
in DEBUG mode, re-throws it:
```csharp
#if DEBUG
throw; // DEBUG: propagates, kills sync
#else
return null; // RELEASE: swallows error, sync continues
#endif
```
SyncDispatcher interprets OperationCanceledException as "sync was cancelled"
and calls Feed.Finish(), stopping sync permanently.
## The Fix
Add a catch for OperationCanceledException with a guard clause:
```csharp
catch (OperationCanceledException) when (!cancellation.IsCancellationRequested)
{
syncPeerPool.ReportWeakPeer(bestPeer, AllocationContexts.ForwardHeader);
return null;
}
```
The condition `when (!cancellation.IsCancellationRequested)` distinguishes:
- Protocol timeout: original token NOT cancelled → handle as weak peer
- Real sync cancellation: original token IS cancelled → propagate exception
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(trie): Mark BlockCommitSet as sealed even when root is null
BlockCommitSet.IsSealed returned `Root is not null`, which was false for
empty state tries where root is null. This caused a Debug.Assert failure
in TrieStore.VerifyNewCommitSet when running in Debug mode, as the
assertion checked that the previous BlockCommitSet was sealed before
starting a new block commit.
An empty state trie with Keccak.EmptyTreeHash is valid (e.g., genesis
blocks with no allocations). Changed IsSealed to use a separate _isSealed
flag that is set when Seal() is called, regardless of whether the root
is null.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Apply suggestions from code review
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* fix(Trie): Correct log level check in PrunePersistedNodes (#10310)
Update TrieStore.cs
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* fix: correct off-by-one in ArrayPoolListCore.RemoveAt (#10306)
* fix: correct off-by-one in ArrayPoolListCore.RemoveAt
* add test
* Update src/Nethermind/Nethermind.Core/Collections/ArrayListCore.cs
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
---------
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Optimization/prewarmer per sender (#10330)
* Prewarm in groups per sender - simplifies nonce management, can rely on previous state - higher success count
* Simplification and cancellation
* refactor
* refactor: remove duplicate GetBlockNumPrefixedKey in BlockStore (#10337)
* Fix higher than expected pruning cache memory during forward sync. (#10336)
* Fix unbounded cache memory
* Update src/Nethermind/Nethermind.Trie/Pruning/TrieStore.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* OPify engine_getPayloadV4 (#10328)
* Check totalPacketSize (#10345)
* Validate header before 4844 (#10344)
Validate block header before 4844 txs
* Move discv5 nodes to a separate db (#10027)
* Move discv5 state to another one db
* Enable for hoodi and mainnet
* Fix bootnodes loading
* Use common nodes; remove enrs from old db
* Refactor a bit
* Fix tests
* Fix
* Fix more
* More fixes
* Fix build
* Update src/Nethermind/Nethermind.Init/Modules/DiscoveryModule.cs
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Update src/Nethermind/Nethermind.Init/Modules/DiscoveryModule.cs
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Update src/Nethermind/Nethermind.Init/Steps/SetupKeyStore.cs
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Fix; add tests
* Fix test
* Add todo
* No more strings
* Fix tests
* Clean up
* Update src/Nethermind/Nethermind.Network.Discovery/IDiscoveryConfig.cs
Co-authored-by: Alex <alexb5dh@gmail.com>
* Simplify Enode->Enr
* Update src/Nethermind/Nethermind.Network.Discovery/IDiscoveryConfig.cs
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Fix nothing
---------
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
Co-authored-by: Alex <alexb5dh@gmail.com>
* feat: add gas benchmark workflow (#10347)
* feat: add github actions to setup and remove dynamic github self-hosted runners
* chore: override sync supported chains workflow for testing new actions
* fix: update workflow ID in setup-runner action configuration
* fix: update wrong variable names for github actions
* fix: update workflow to capture correct triggering user
* fix: change env variable names to avoid collision with github workflow special env variables
* fix: add additional checks for runner removal action
* fix: update the github app used for authentication
* fix: add optional runner token input for setup and removal actions
* fix: update output reference for runner name in setup-runner action
* fix: add runner user creation and execution logic in setup-runner script
* fix: refactor runner setup script to enforce root execution and streamline user creation
* feat: add gas benchmark execution logic
* fix: add Git-LFS installation to runner setup script
* refactor: update setup and configure runner workflows to use ssh for improved security
* refactor: enhance security by masking registration token and streamlining SSH execution in runner configuration
* feat: add logging functionality to runner setup and configuration scripts for better traceability
* fix: set HOME environment variable in gas-benchmark workflow
* fix: increase setup wait time in gas-benchmark workflow
* refactor: add publish docker image action
* feat: add publish-docker job to sync-supported-chains workflow
* fix: move incorrect checkout steps
* chore: restore original sync supported chains workflow and add the run gas benchmarks workflow
* feat: allow gas benchmarks workflow to be triggered by pr labels
* XDC Subnet snapshot support (#10287)
* feat: SubnetSnapshot type and decoder
* refactor: use BaseSnapshotDecoder
* style: remove whitespace
* refactor: snapshot decoders to take factory
* feat: add prewarmer get operation timing metrics (#10289)
* feat: add prewarmer get operation timing metrics
Add PrewarmerGetTime histogram metric to track timing of prewarmer
cache operations (address/slot hits, misses, hints, and dispose).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Prewarmer metrics
* Progress
* Revert change in TrieStoreScopeProvider
* Measure write batch
* fix test
* Adjust resolution
* Address PR review feedback
- Save Labels array in field instead of creating new array each call
- Add DetailedMetricOnFlagAttribute for skipping flag properties in tests
- Use AssertionException instead of generic Exception in tests
- Create static PrewarmerGetTimeLabel instances to avoid allocations
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Set flag during loop instead of lookup by name
- Remove DetailedMetricFlagName constant
- Set DetailedMetricsEnabled directly when attribute is detected
- Add test assertion to verify flag is set correctly
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* fix: apply VerifyChecksum config to column families and snapshots (#10323)
* fix: apply VerifyChecksum config to column families and snapshots
* fix: apply VerifyChecksum config to column families and snapshots
* fix: apply VerifyChecksum config to column families and snapshots
* Update ColumnDb.cs
* Update DbOnTheRocks.cs
* fix(tests): add CancellationToken to SemaphoreSlim Wait calls in EngineModuleTests (#10318)
* Add .worktrees to .gitignore
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(tests): add CancellationToken to SemaphoreSlim Wait calls in EngineModuleTests
Tests using SemaphoreSlim.WaitAsync() without cancellation tokens can hang
indefinitely if the expected event never occurs. This change adds proper
CancellationToken parameters to prevent test hangs:
- Maintain_correct_pointers_for_beacon_sync_in_archive_sync
- getPayloadV1_picks_transactions_from_pool_v1
- executePayloadV1_accepts_already_known_block
- executePayloadV1_on_top_of_terminal_block
- executePayloadV1_on_top_of_not_processed_invalid_terminal_block
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Remove duplicate logic in SpanSource.IsNotNullOrEmpty (#10340)
* Update ConsoleExitHandler.cs
* Update ConsoleExitHandler.cs
* Update SpanSource.cs
---------
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Make decoders static to reduce allocations in Vote and Timeout (#10234)
* Update Vote.cs
* Update Timeout.cs
---------
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Fix race condition in ShutterBlockHandler (#10296)
* fix(shutter): add synchronization to CancelWaitForBlock to prevent race condition
* Add lock to Dispose
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Fix Dispose lock
* Fix test for async TCS completion
---------
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Auto-update fast sync settings (#10365)
Co-authored-by: rubo <rubo@users.noreply.github.com>
* Update OP Superchain chains (#10364)
Co-authored-by: emlautarom1 <emlautarom1@users.noreply.github.com>
* Parse incoming Jsons in chunks (#10207)
* Parse incoming Jsons in chunks
* changes
* better error handling
* move start time
* dispose jsondocument on exception
* fix microseconds
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix copilot review
* whitespace
* fix TrimStart
* Guard ReadAsync
* fix
* Fix test endpoint to match transport semantics for multiple JSON requests (#10356)
* Initial plan
* Change test endpoint from Http to Ws for multiple requests test
Co-authored-by: LukaszRozmej <12445221+LukaszRozmej@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: LukaszRozmej <12445221+LukaszRozmej@users.noreply.github.com>
* Update src/Nethermind/Nethermind.JsonRpc/JsonRpcProcessor.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fixes
* more fixes
* Update src/Nethermind/Nethermind.JsonRpc.Test/JsonRpcProcessorTests.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* make http endpoint AllowMultipleValues = false
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ben {chmark} Adams <thundercat@illyriad.co.uk>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: LukaszRozmej <12445221+LukaszRozmej@users.noreply.github.com>
* Skip cache for identity precompile (#10366)
* Skip cache for identity precompile
Introduce a SupportsCaching flag on IPrecompile (default true) and mark IdentityPrecompile as non-caching. Update CachedCodeInfoRepository to only wrap precompiles in a CachedPrecompile when SupportsCaching is true (preserving behavior when cache is null). Add comprehensive tests: CachedCodeInfoRepositoryTests validate wrapping behavior, cache hits, multiple inputs, and interactions with Identity/SHA256 precompiles; SupportsCachingTests assert which precompiles enable caching by default. These changes prevent inefficient caching for Identity and ensure correct caching semantics.
* Update src/Nethermind/Nethermind.Blockchain/CachedCodeInfoRepository.cs
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* formatting
---------
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* perf: eliminate List allocations in PeerManager count operations (#10362)
* Update IPeerManager.cs
* Update PeerManager.cs
* Update ParityRpcModule.cs
* Update EthStatsIntegration.cs
* Update ParityRpcModuleTests.cs
* fmt
* fmt
* Remove usings, replaced bots PR (#10372)
* Remove usings
* fix build
* Improve SendBlobs tool (#9872)
* Clean up blob sender
* Default forks = Osaka; seed for randomness
* WS
* Improve rpc
* Clean up the code a bit more
* More
* Move some Taiko RPC calls to auth namespace and clean up used code (#10352)
* refactor: move some Taiko RPC calls to auth namespace and clean up unused code
* Add lookback limit for batch ID block traversal in Taiko RPC module
* Skip preconfirmation blocks in TaikoEngineRpcModule batch traversal
* fix cspell
---------
Co-authored-by: Diptanshu Kakwani <dipkakwani@gmail.com>
* Sync Taiko Geth Changes into NMC (#10377)
* [Taiko Sync] Skip EIP-4396 check when ancestor missing, fix RPC response casing
Changes:
- TaikoHeaderValidator: Skip EIP-4396 verification when ancestor block is
missing instead of returning validation error. Logs warning and continues.
(taiko-geth commit 5d7599848)
- PreBuiltTxList: Change JSON property names from PascalCase to camelCase
to match taiko-geth RPC response format.
(taiko-geth commit f1856b667)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* remove names
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Xdc : SpectialTx Handling (#9855)
* Adds Sign tx handling : draft
* Added createSignTx
* Add some spec changes
* fix the TIP check
* refactor transaction validation
* fix incorrect check
* inject txProcessor and txExecutor
* minor fixes and refactors
* more tests and more fixes
* add more tests
* clean up
* update test submodule
* checkout tests commit from master
* ws fixes
* refactor staticness away
* minor refactor
* seal TransactionProcessor
* remove un-needed preproc directive
* fix wrong check, and another approach for tx validation failure reporting
* ws fixes
* remove blacklisting from main code
* major refactors, moved removed building and validation txExecutor and moved tx ordering logic to TxComparer
* remove external changes
* move special addresses to chainspec and releasespec
* a better appraoch to handle spec in comparer
* fix build issues (wip)
* make sign and empty txs free in validation as well
* better approach to skip gas validation for free xdc txs
* minor refactor
* write more handling tests
* fix build issues
* fix failiing test
* whitespace fix
* Update src/Nethermind/Nethermind.Xdc/XdcTransactionProcessor.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix forgotten tests
* Update src/Nethermind/Nethermind.Xdc/XdcTransactionProcessor.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* refactors
* simply condition
* fix build issues
* fix failing test
* removed unused random tx
* rename method
* remove unecessary delays
* fix injection points
* hook releaseSpec to chainspec
* Add fields to json
* added more fields to the config
* removed redundant code
* added specific exception to txpool sumbition failure
* use mergeSignRange from spec in rewardCalc
* fix failing test
* apply fix
* Update XdcTransactionProcessor.cs
Co-authored-by: ak88 <anders@nethermind.io>
* remove unneed throw of exception
* optimization
* sign tx should be free
* overrides to TxPool filters and policies
fix blacklist check
* added more checks in releaseSpec
reworked some fields
* remove internal modifier from prop on releasespec
* remove internal modifer from chainspec
* fix randomize tx being free
* pay no fees for SpecialTxs
* fix failing rewards tests
* ws fixes
* fix failing tests
* releasespec changes
* reward tests refactor
* make randomizeTx free but not free
* refactor our virtually unused calls
* fix failing test
* add extra test
* add more tests
* fix ws
* refactors
* fix flaky test and remove consolewrite
* add eip1559 tests
* add words to spelling
* fix json
* Update src/Nethermind/Nethermind.Xdc/XdcTransactionProcessor.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Nethermind/Nethermind.Xdc.Test/ModuleTests/RewardTests.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Nethermind/Nethermind.Xdc/XdcConstants.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Nethermind/Nethermind.Xdc/SignTransactionManager.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Nethermind/Nethermind.Xdc/SignTransactionManager.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Nethermind/Nethermind.Xdc/XdcTransactionProcessor.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Nethermind/Nethermind.Xdc.Test/SpecialTransactionsTests.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* cleanup
* Update src/Nethermind/Nethermind.Xdc.Test/SpecialTransactionsTests.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* more and more cleanup
* fix failing test
* fix build issue
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: ak88 <anders@nethermind.io>
Co-authored-by: ak88 <anders.holmbjerg@hotmail.com>
* XDC Subnet block header (#10305)
* feat: XdcSubnetBlockHeader type and decoder
* fix: make CalculateHash virtual
* Add LINQ guideline to agents (#10381)
* Add LINQ guideline to agents
Update AGENTS.md: Add a new guideline advising against recommending LINQ when a simple loop would suffice.
* Update AGENTS.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update AGENTS.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* spell
* Add GitHub Copilot instructions and LINQ guideline (#10382)
* Initial plan
* Add .github/copilot-instructions.md referencing AGENTS.md
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>
* Add LINQ guideline to AGENTS.md (#10384)
* Initial plan
* Remove .github/copilot-instructions.md as AGENTS.md is sufficient
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>
* Fix static node not marked as static when added via AddAsync (#10390)
When adding a static node via StaticNodesManager.AddAsync, the created
Node was not marked with IsStatic=true before being emitted via the
NodeAdded event. This caused downstream consumers (INodeSource) to
receive nodes without the static marker.
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Fix OverridableEnvFactory.BuildAndOverride on Exception (#10393)
* XDC Fix calculation of rewards per signer (#10355)
* fix calculation of proportional rewards and add test
* fix other tests accordingly and format
* (refactor) Make comparisons between transactions more readable (#10394)
* Make comparisons between transactions more readable
* Introduce BlobTxPriorityComparer
* rename refactor
* Fix outdated Microsoft.Extensions.Caching.Memory (#10401)
Fix outdated Microsoft.Extensions.Caching.Memory ref brought in by Lantern.Discv5
* Load plugins in tests properly; remove '\' from test name (#10400)
Load plugins in tests properly; remove '\' from test name so it can be run in MSVS
* Add block timestamp (#10333)
* Add block timestamp to tx for rpc
* Clean up format
* Fix build
* Fix tests
* Refactor a bit
* Unify ctors
* Update src/Nethermind/Nethermind.Facade/Eth/RpcTransaction/AccessListTransactionForRpc.cs
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Review
---------
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* taiko hoodi shasta activation (#10406)
* Harden rpc transaction validations (#10395)
* fix: validate BlobVersionedHashes length and version in eth_call
* remove todo
* Add test
* Add complex validations
* flip validateUserInput default flag
* fix
* Revert "flip validateUserInput default flag"
This reverts commit 08509f12c7cee36a5fa9c9d5db9e4a4dd354a913.
* refactor
* fix
* fix
* fixes
* fix for eth_simulate hive tests
* Update src/Nethermind/Nethermind.Facade/Eth/RpcTransaction/BlobTransactionForRpc.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* refactor
* Add Gas to failing trace
* fix
---------
Co-authored-by: GarmashAlex <garmasholeksii@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Optimize KeccakCache (#10391)
* Optimize KeccakCache
* spelling
* Feedback
* Optimize Json hex parsing (#10389)
* Optimize hex parsing
* spell
* Update src/Nethermind/Nethermind.Serialization.Json/ByteArray32Converter.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add XdcBeaconSyncStrategy to provide target block height from sync config (#10411)
* implement XdcBeaconSyncStrategy using pivot as target block height
* remove unused imports and format
* Fixes 4 flaky test + refactors dbs (#10407)
* Fix XDC flaky reward test with correct signature for transaction
* Add Retry to LockFairnessTest
* fix GetMemoryOwner for managed dbs + refactors
* whitespace
* Decrease Retain_Some_PersistedNodes threshold to resolve flakiness
* fix review
* tiny refactor
* Parallelize Trie.Tests
* Parallelize Nethermind.Blockchain.Test
* Revert FilterManagerTests parall
* Update Dockerfiles (#10409)
Co-authored-by: rubo <rubo@users.noreply.github.com>
* parallelize txpool test + fixes for parallel blockchain tests (#10418)
* Fix XDC flaky reward test with correct signature for transaction
* Add Retry to LockFairnessTest
* fix GetMemoryOwner for managed dbs + refactors
* whitespace
* Decrease Retain_Some_PersistedNodes threshold to resolve flakiness
* fix review
* tiny refactor
* Parallelize Trie.Tests
* Parallelize Nethermind.Blockchain.Test
* Revert FilterManagerTests parall
* parallelize some TxPool tests
* Try parallelize more tests
* make TxPool tests more parallelizable
* revert
* fix
* fix issues in Nethermind.Blockchain.Test
* more fixes
* more fixes
* FilterManagerTests nonparallelizable
* fix
* fix flaky test
* fix shutter test
* Add retry to Fuzz_accounts_with_storage
* retry flaky test
* add [NonParallelizable]
* XDC - Add custom state sync allocation strategy (#10399)
add custom state sync allocation strategy for xdc
* ProcessingStats Extensibility (#10420)
* processing stats extensibility
* improvement
* build fix
* fix
* fix: correct Bytes.BytesComparer length comparison ordering (#10353)
* fix: correct Bytes.BytesComparer length comparison ordering
The BytesComparer had inverted length comparison logic:
- null was considered greater than non-null (should be less)
- shorter arrays with same prefix were considered greater than longer
arrays (should be less)
Fixed by inverting the return values for length-related comparisons:
- null < non-null
- [] < [x, ...] (empty < non-empty)
- [prefix] < [prefix, more] (shorter with same prefix < longer)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Switched to sequence compare to
* Address comment
* fix: handle null y in BytesComparer when x is non-null
Null arrays implicitly convert to empty ReadOnlySpan<byte> in
SequenceCompareTo, losing the null vs empty distinction.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Use CodeInfo type instead of ICodeInfo (#10423)
* Use CodeInfo type instead of ICodeInfo
Replace the ICodeInfo abstraction with a concrete CodeInfo type and adapt related APIs and implementations. CodeInfo was extended to carry precompile info, provide Code/CodeSpan, Version, IsPrecompile/IsEmpty semantics and background analysis. EofCodeInfo now derives from CodeInfo and provides EOF-specific data and versioning. PrecompileInfo was removed and precompiles are represented as CodeInfo (wrapping CachedPrecompile when needed).
API changes: ICodeInfoRepository, IOverridableCodeInfoRepository and IPrecompileProvider signatures and caches now use CodeInfo; CodeInfoFactory and CodeLruCache updated accordingly. Call sites across the VM, instruction implementations, tracers, transaction processing, repositories and tests were updated to use CodeInfo directly and to perform EOF checks using 'is EofCodeInfo' where appropriate. JumpDestinationAnalyzer.MachineCode was made accessible for CodeInfo.Code.
Overall this unifies EOF and precompile handling under a single CodeInfo model and simplifies caching and execution logic.
* Feedback
* Update CI workflows for Taiko/Surge integration tests (#10419)
* Add CI workflow for Surge integration tests and update workflow for Taiko
* Update CI workflow to reference the correct surge configuration file
* Update CI workflows to increase timeout for integration tests and adjust repository references
* Resolve comments
* Parallelizable does not work on all XDC tests (#10431)
remove broken Parallelizable
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Add JitAsm tool to be able to analyse the Jit output (#10432)
* Add JitAsm tool to be able to analyse the Jit output
* Spelling
* Address AGENTS.md LINQ guideline feedback on JitAsm PR (#10433)
* Initial plan
* Strengthen AGENTS.md LINQ guideline with explicit examples
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>
* Spell
* feedback
* Feedback
* Improve initialization
---------
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benaadams <1142958+benaadams@users.noreply.github.com>
* Update README with performance highlights of Nethermind (#10359)
* Update README with performance highlights of Nethermind
Revised description to emphasize performance metrics.
* Update README.md
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* Update README.md
Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>
* Update README with image sources and badges
* Add 'srcset' to cspell.json dictionary
* Remove cspell directives from README
Removed cspell directives from README.md.
---------
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>
* Auto-update fast sync settings (#10449)
Co-authored-by: rubo <rubo@users.noreply.github.com>
* Update OP Superchain chains (#10448)
Co-authored-by: emlautarom1 <emlautarom1@users.noreply.github.com>
* Fix flaky tests: timing and race condition (#10455)
- PeerManagerTests: Increase After timeout from 1000ms to 3000ms in
Will_not_stop_trying_on_rlpx_connection_failure to prevent false
failures on loaded CI runners
- SyncServerTests: Use Interlocked.Increment in
Broadcast_NewBlock_on_arrival_to_sqrt_of_peers to fix race condition
where concurrent SyncPeerMock background threads could lose count
increments
- Rename _travisDelay fields to _delay, _delayLong, _delayLonger
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Metrics and BlockStatistics extension (#10429)
* Metrics and BlockStatistics…
Should replace #10191
Changes
Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
RPC traffic.
Remarks
One thing which is kind of wrong is that we ignore trailing garbage:
Will result in parsing error in Geth and correct response from us.
I tried to make it work with looking into how to handle it.
But it also depends on the channel - through sockets we can get multiple JSON documents one by one. Which is not happening by http.
If they got chunked in any way we would need to try to wait for next chunk.
It all got very complicated.
What we could do:
{or[- which at least haves a chance to be proper json